Skip to content

feat: replace instanceof Promise and support Promise/A+ - #310

Merged
vlapo merged 9 commits into
typestack:masterfrom
andrewwa-kainos:master
Jul 25, 2019
Merged

vlapo merged 9 commits into
typestack:masterfrom
andrewwa-kainos:master

Conversation

@andrewwa-kainos

Copy link
Copy Markdown
Contributor

This fixes a problem found wherein "Promise" instances from ES5 were not recognised as "instanceof Promise" from ES2015.

@timja

timja commented Jan 28, 2019

Copy link
Copy Markdown

@NoNameProvided Would you be able to take a look at this please when you have time? Thanks

@vlapo

vlapo commented Jul 21, 2019

Copy link
Copy Markdown
Contributor

I am ok with support Promise/A+ compliant thenable but why we need another dependency because of one function? Could you please create e.g. new utils.ts file with isPromise function?

@andrewwa-kainos

Copy link
Copy Markdown
Contributor Author

@vlapo Done

@vlapo vlapo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewwa-kainos Thnx for your effort. Could you please check my in-code comment?

Note: We have also new ValidatePromise (merged it few moments ago). Could you rebase and also use your isPromise method in this validator?

Comment thread src/utils.ts Resolved
@vlapo

vlapo commented Jul 25, 2019

Copy link
Copy Markdown
Contributor

Thank you for your contribution :)

@vlapo vlapo changed the title Use isPromise instead of instanceof Promise feat: replace instanceof Promise and support Promise/A+ Jul 25, 2019
@vlapo
vlapo merged commit 59eac09 into typestack:master Jul 25, 2019
@vlapo vlapo added this to the v0.10.0 milestone Jul 26, 2019
@github-actions

github-actions Bot commented Aug 4, 2020

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants